import list_behavior from "../../../behavior/list_behavior";

const app = getApp()
const global = app.globalData

Page({
    behaviors:[list_behavior],
    data: {
        nav:{
            title:"退款/售后"
        },
        imageUrl:global.imageUrl,

    },
    onLoad: function (options={}) {
        this.init(options)
    },

    statusChange(e){
        const {value} = e.detail
        const {list} = this.data
        const where = list.where
        where.audit_status = value
        this.setData({
            [`list.where`]:where
        })
        this.setList(1)

    },

    async init(options){
        options.audit_status = options.audit_status || ''
        this.setData({
            [`list.url`]:'/orderRefund/paginate',
            [`list.where`]:{
                audit_status:options.audit_status,
            },
            options,
        })
        this.setList(1)
    }
});
